package Items;

/**
 * ToolItem: An abstract representation of a tool to be used in the game. Is an Item that
 * also has a set number of uses, which decrements each time the item is used until the
 * item breaks.
 * @author Branon Lyle
 */
public abstract class ToolItem extends Item {

    /* number of uses left before the tool breaks */
    private int numUses;
    
    /**
     * ToolItem Constructor
     * @param basePrice
     * @param kleptons
     * @param description
     * @param numUses
     */
    public ToolItem(int basePrice, int kleptons, int quantity, String description, int numUses) {
        super(basePrice, kleptons, quantity, description);
        this.numUses = numUses;
    }
    
    /**
     * Use the item one time, decrementing the number of uses left before break
     */
    public void use() {
        numUses--;
    }
    
    /**
     * String representation of a ToolItem
     * @return String
     */
    public String toString() {
        return "Tool Item";
    }
}
